package com.hhc.query;

import jakarta.validation.constraints.*;
import java.time.LocalDateTime;
import lombok.Data;

/**
 * <p>
 *   操作日志查询参数封装对象
 * </p>
 * @author pc
 */
@Data
public class OperationLogQuery {

    private Long userId;

    @NotBlank(message = "操作类型不能为空")
    private String operationType;

    @NotBlank(message = "所属模块不能为空")
    private String moduleName;

    @FutureOrPresent(message = "开始时间不能晚于当前时间")
    private LocalDateTime startTime;

    @FutureOrPresent(message = "结束时间不能晚于当前时间")
    private LocalDateTime endTime;

    @Min(value = 1, message = "页码必须大于等于1")
    private Integer page;

    @Min(value = 1, message = "每页大小必须大于等于1")
    private Integer size;
}